begintownscript;
variables;
short choice,i,j,random,level;

body;
beginstate init_state;
i = 0;
while(char_ok(i) == 0){
	i = i + 1;
}

relocate_character(i,3,3);
force_view_center(3,3);
set_character_pose(i,0);
set_character_facing(i,6);
force_instant_terrain_redraw();

level = get_level(i);
set_level(i,18);
while(level > 1){
	change_char_xp(i,-25 * 100);
	level = level - 1;
}
level = 18;
while(level > 1){
	change_char_xp(i,500);
	change_char_xp(i,500);
	level = level - 1;
}
j = 0;
while(j <= 19){
	if(get_spell_level(i,0,j) > 0)
		change_spell_level(i,0,j,-1* get_spell_level(i,0,j));
	if(get_spell_level(i,1,j) > 0)
		change_spell_level(i,1,j,-1 * get_spell_level(i,1,j));
	j = j + 1;
}
j = 0;
while(j <= 22){
	set_char_trait(i,j,0);
	j = j + 1;
}
change_pc_skill_pts(i,-1 * (get_char_skill_pts(i)));
alter_stat(i,0,6 - get_stat(i,0)); //- Strength
alter_stat(i,0,6 - get_stat(i,0)); //- Strength
alter_stat(i,1,10 - get_stat(i,1)); // - Dexterity
alter_stat(i,1,10 - get_stat(i,1)); // - Dexterity
alter_stat(i,2,3 - get_stat(i,2)); // - Intelligence
alter_stat(i,2,3 - get_stat(i,2)); // - Intelligence
alter_stat(i,3,8 - get_stat(i,3)); // - Endurance
alter_stat(i,3,8 - get_stat(i,3)); // - Endurance
alter_stat(i,4,7 - get_stat(i,4)); // - Melee Weapons
alter_stat(i,5,0 - get_stat(i,5)); // - Pole Weapons
alter_stat(i,6,0 - get_stat(i,6)); // - Bows
alter_stat(i,7,8 - get_stat(i,7)); // - Thrown Missiles
alter_stat(i,7,8 - get_stat(i,7)); // - Thrown Missiles
alter_stat(i,8,0 - get_stat(i,8)); // - Hardiness
alter_stat(i,9,0 - get_stat(i,9)); // - Defense
alter_stat(i,10,4 - get_stat(i,10)); // - Assassination
alter_stat(i,11,0 - get_stat(i,11)); // - Mage Spells
alter_stat(i,12,0 - get_stat(i,12)); // - Priest Spells
alter_stat(i,13,0 - get_stat(i,13)); // - Arcane Lore
alter_stat(i,14,0 - get_stat(i,14)); // - Potion Making
alter_stat(i,15,6 - get_stat(i,15)); // - Tool Use
alter_stat(i,16,0 - get_stat(i,16)); // - Nature Lore
alter_stat(i,17,0 - get_stat(i,17)); // - First Aid
alter_stat(i,18,0 - get_stat(i,18)); // - Luck
alter_stat(i,19,2 - get_stat(i,19)); // - Quick Strike
alter_stat(i,20,0 - get_stat(i,20)); // - Parry
alter_stat(i,21,0 - get_stat(i,21)); // - Blademaster
alter_stat(i,22,4 - get_stat(i,22)); // - Anatomy
alter_stat(i,23,2 - get_stat(i,23)); // - Gymnastics
alter_stat(i,24,0 - get_stat(i,24)); // - Pathfinder
alter_stat(i,25,0 - get_stat(i,25)); // - Magery
alter_stat(i,26,0 - get_stat(i,26)); // - Resistance
alter_stat(i,27,0 - get_stat(i,27)); // - Magical Efficiency
alter_stat(i,28,4 - get_stat(i,28)); // - Lethal Blow
alter_stat(i,29,0 - get_stat(i,29)); // - Riposte
alter_stat(i,30,2 - get_stat(i,30)); // - Sharpshooter

pay_coins(coins_amount());
set_name(i,"Bounty Hunter");
reward_give(456);
reward_give(18);
reward_give(384);
reward_give(384);
reward_give(459);
reward_give(457);
reward_give(228);
reward_give(228);
reward_give(228);
reward_give(233);
reward_give(233);
reward_give(455);
reward_give(458);
change_char_energy(i,999);
change_char_health(i,-999);
change_char_health(i,999);
revive_party();

level = 0;
while(level <= 63){
	print_str("");
	level = level + 1;
}
print_str_color("Now entering: The Bounty Hunter's Tale",3);

set_name(8,"Sly");
set_char_dialogue_pic(8,300,0);
break;

beginstate exit_state;
break;

beginstate start_state;
if(get_flag(200,0) == 1){
	message_dialog("I came here hunting a man name Christopher Sly. He was wanted by Lord Blacken for theft of a family heirloom-- I was sent to bring him back, dead or alive.","I am a bounty hunter, you see, and there was no small bounty on Sly's head.");
}
inc_flag(200,0,1);
break;

beginstate 10;
if(get_flag(200,1) == 0)
	message_dialog("I had picked up Sly's trail a week ago from a tip at an inn back in New Haven, and had tracked him all the way here.","I had begun to wonder if Sly hadn't given me the slip, but then yesterday morning I heard from a stable boy at the Basilisk Inn that a man matching Sly's description had passed through.");
set_flag(200,1,1);
break;

beginstate 11;
if(get_flag(200,2) == 0)
	message_dialog("I increased my pace to attempt to overtake him, but proceeded cautiously. I left the main road and instead snuck through the shadows of the pine forest-- hoping to find him traveling in the open and take him unawares.","");
set_flag(200,2,1);
break;

beginstate 12;
if(get_flag(200,3) == 0)
	message_dialog("I could hear the clip-clop of hooves and the rattling of wagon wheels from up ahead, and occasionally caught a glimpse of a cart through the foliage.","I kept to the cover of the trees, but moved closer to the road to better observe. It occurred to me that I might do best to simply follow and wait for Sly to come to me. If he was nearby it was only a matter of time before he waylaid the merchant.");
set_flag(200,3,1);
break;

beginstate 13;
if(get_flag(200,4) == 0){
	block_entry(1);
	message_dialog("I didn't even have to wait. There he was, riding beside the merchant and holding up a red linen tunic that he'd pulled out of the back. He was an easy target-- a five hundred gold sitting duck.","He put the tunic in his pack, and reached back to root through the merchant's goods again. That was when I struck.");
	set_character_pose(i,1);
	force_instant_terrain_redraw();
	put_jagged_zap(char_loc_x(i),char_loc_y(i),22,13,5);
	run_animation_sound(14);
	pause(1);
	set_character_pose(i,2);
	force_instant_terrain_redraw();
	relocate_character(8,22,14);
	set_character_pose(8,14);
	force_instant_terrain_redraw();
	pause(2);
	message_dialog("My dagger struck him in the arm, knocking him from the cart. If I'd wanted to kill him I could have hit him in the neck and ended it right there. In retrospect I should have.","But Blacken preferred that Sly be taken alive, in the hope that he'd reveal where the stolen heirloom was. In all likelihood he had pawned it the second he got it, but it was worth a shot to try to recover it.");
	relocate_character(i,23,10);
	force_view_center(23,10);
	activate_hidden_group(1);
	set_character_pose(6,8);
	force_instant_terrain_redraw();
	pause(2);
	set_character_pose(i,1);
	force_instant_terrain_redraw();
	pause(1);
	put_sparkles_on_char(6,7,10);
	put_sparkles_on_char(7,7,10);
	run_animation_sound(163);
	pause(1);
	set_character_pose(i,2);
	force_instant_terrain_redraw();
	pause(1);
	message_dialog("Fear dust. I hurled a handful of it at the merchant, then quickly stepped back. Fear dust alters the mind, causing paralyzing fear. If the wind shifts, though, it can wind up blowing right back in your face.","The dust works rapidly once inhaled. The carthorse, spooked by both the bloodshed and the dust, reared up and knocked over the cart.");
	play_sound(-117);
	relocate_character(6,24,12);
	set_character_pose(6,14);
	erase_char(7);
	set_terrain(21,14,264);
	set_terrain(24,14,264);
	set_terrain(23,14,449);
	set_terrain(21,11,448);
	force_instant_terrain_redraw();
	message_dialog("I waited a few seconds while the dust settled, then moved forward to see what had happened to Sly. Hopefully the cart hadn't fallen on him.","And it hadn't. He had already gotten to his feet and had drawn his sword. His other arm hung useless at his side.");
	set_character_pose(8,2);
	set_character_facing(8,0);
	force_instant_terrain_redraw();
	set_flag(200,4,1);
}
break;

beginstate 13;
if(get_flag(200,4) == 2){
	block_entry(1);
	message_dialog("I had a fight on my hands.","");
}
break;

beginstate 14;
erase_char(9);
message_dialog("Sly wasn't half bad with a blade. He was a worthy foe-- but I had the overwhelming advantage of having the use of both my arms.","The fight was over before it began.... Except that it wasn't.");
play_sound(5);
message_dialog("He had fallen back to try to catch his breath, but I pushed my advantage. As I drew within striking range, though, a blinding explosion suddenly went off.","I stumbled backwards, stunned. It took me a second to realize what it was. It was a flash bang, a simple explosive that was all bark and no bite. I cursed myself for being caught off guard by such a basic maneuver.");
message_dialog("When my vision finally cleared Sly was nowhere to be seen. It didn't matter; wherever he had headed he wouldn't get far.","That dagger had been poisoned-- before the end of the night he'd be praying for me to find him and deliver the antidote-- and haul him back to Lord Blacken.");
message_dialog("A groan from the nearby merchant interrupted my thoughts. The fear dust had completely incapacitated him-- it's a shame when civilians get in the way.","This fellow would be alright by the end of the night-- so long as nobody else got to him while he was laying there. He was out a horse and a wagon axle, but I could hardly help that.");
play_sound(48);
pause(1);
message_dialog("_What the hell....._","");
activate_hidden_group(3);
set_name(10,"Warrior");
force_instant_terrain_redraw();
message_dialog("I turned just in time to see a warrior charging from the forest to the south. He had his sword raised high over his head, and looked like he was ready to cleave me clean in half.","He was a big fellow, and wearing heavy plate armor. He wasn't a bandit-- he was too well fed for that-- but hell if I knew who he was. He was charging me; that was enough information for the moment.");
break;

beginstate 15;
	message_dialog("This guy was good. Usually heavily armored opponents aren't much of a problem-- it takes a bit more work to wear them down, but eventually my dexterity and mobility will win the day. But this guy was quick, and he swung his sword like a blademaster.","The fight was going poorly for me. He had the advantage of surprise, and that's an advantage I'm used to keeping on my side. This was a pointless fight-- it was time to make my escape.");
	message_dialog("I fell back under his last barrage of blows. As he raised his sword to deliver the killing stroke, I pulled my cloak around myself.","And vanished.");
	relocate_character(i,46,46);
	force_view_center(46,46);
	set_character_pose(i,0);
	force_instant_terrain_redraw();
	put_sparkles_on_char(i,11,10);
	run_animation_sound(163);
	pause(3);
	message_dialog("It's a useful thing to be able to vanish into thin air. That cloak had cost me a fortune-- but it had saved my life more than enough times to make it worth every penny.","");
	erase_char(10);
break;

beginstate 16;
message_dialog("I staggered away from the battle site under the cover of my cloak. I was winded from the two consecutive battles, but had not sustained any serious wounds.","My brush with that warrior had kept me from my prey, but at least it hadn't turned fatal. It was time I returned to my hunt-- I'd wasted enough time and energy, and Sly now had the lead.");
reset_dialog();
add_dialog_str(0,"It took me several more hours to find Sly's trail. He fled to the cover of the forest immediately after he set off the flash bang, which is why he had already been out of sight.",0);
add_dialog_str(1,"Once found, though, his trail wasn't hard to follow. Not far from the battle sight he began to falter and stumble, eventually returning to the main road.",0);
add_dialog_str(2,"The occasional fresh footprint in the dirt or a drop of blood told me that he had stuck to the road, and hadn't tried doubling back to give me the slip. I doubt he had the endurance to try something like that-- he had to find help or he'd collapse.",0);
add_dialog_str(3,"And good luck finding help in these soulless parts.",0);
move_to_new_town(21,23,46);
//move_to_new_town(1,23,46);
break;

beginstate 100;
block_entry(1);
break;

beginstate 101;
message_dialog("Hmmm.... That's not how I remember it.","");
end_scenario(1);
break;